import request from '@/utils/request'

export function getRegionByAdcode(adcode) {
  return request({
    url: '/Member/Region/index',
    method: 'post',
    params:{
      adcode
    }
  })
}//换取companyid

export function loadBanner() {
  return request({
    url: '/Member/Index/slider',
    method: 'post',
    params:{}
  })
}//首页轮播图

export function loadComment(limit) {
  // alert(page);
  // alert(rows)
  return request({
    url: '/Member/Index/comment',
    method: 'get',
    params:{
      limit
    }
  })
}//首页评价列表

export function loadJoinUs(page,rows) {
  return request({
    url: '/Member/company_article/lists',
    method: 'get',
    params:{
      page,
      rows
    }
  })
}//首页加盟动态列表

export function loadGoods(page,rows) {
  return request({
    url: '/Member/Goods/cate',
    method: 'get',
    params:{
    }
  })
}//商品列表

export function loadWashType(page,rows) {
  return request({
    url: '/Member/Order/param',
    method: 'get',
    params:{
    }
  })
}//商品洗护类型和取货时间

export function loadAdress(param) {
  return request({
    url: '/Member/Address/lists',
    method: 'get',
    params:param
  })
}//收货地址列表

export function loadServicePage(param) {
  // console.log(param)
  return request({
    url: '/Member/company_one/one',
    method: 'get',
    params:{
      type:param
    }
  })
}//服务介绍，服务范围

export function loadAboutUs() {
  // console.log(param)
  return request({
    url: '/Member/Article/one',
    method: 'get'
  })
}//关于我们

export function loadHightCare(param) {
  // console.log(param)
  return request({
    url: '/Member/Article/lists',
    method: 'get',
    params:param
  })
}//高端洗护

export function HightCareContent(id) {
  // console.log(param)
  return request({
    url: '/Member/Article/info',
    method: 'get',
    params:{
      id
    }
  })
}//高端洗护文章详情

export function loadOrders(param) {
  // console.log(param)
  return request({
    url: '/Member/Order/lists',
    method: 'get',
    params:param
  })
}//订单列表

export function loadOrdersUnComment(param) {
  // console.log(param)
  return request({
    url: '/Member/Comment/lists',
    method: 'get',
    params:param
  })
}//订单待评价状态列表

export function orderDetalis(id) {
  // console.log(id)
  return request({
    url: '/Member/Order/info',
    method: 'get',
    params:{oid:id}
  })
}//订单详情

export function UncommentDetails(id) {
  // console.log(id)
  return request({
    url: '/Member/Comment/info',
    method: 'get',
    params:{comment_id:id}
  })
}//待评价订单详情

export function setDefaultAdress(id) {
  // console.log(id)
  return request({
    url: '/Member/Address/setdef',
    method: 'post',
    data:{address_id:id}
  })
}//设置默认地址

export function delAdress(id) {
  // console.log(id)
  return request({
    url: '/Member/Address/del',
    method: 'post',
    data:{address_id:id}
  })
}//删除地址

export function addAdress(param) {
  // console.log(id)
  return request({
    url: '/Member/Address/add',
    method: 'post',
    data:param
  })
}//新增地址

export function updateAdress(param) {
  // console.log(id)
  return request({
    url: '/Member/Address/edit',
    method: 'post',
    data:param
  })
}//修改地址

export function orderParam() {
  // console.log(id)
  return request({
    url: '/Member/Order/param',
    method: 'get'
  })
}//订单所需产品参数

export function submitOrder(param) {
  console.log(JSON.stringify(param))
  return request({
    url: '/Member/Order/yuyue',
    method: 'post',
    data:param
  })
}//提交订单

export function myTeam(param) {
  // console.log(id)
  return request({
    url: '/Member/Member/team',
    method: 'get',
    params:param
  })
}//我的团队

export function updateInfo(param) {
  // console.log(param)
  return request({
    url: '/Member/Member/info',
    method: 'post',
    data:{
      nickname:param
    }
  })
}//修改个人信息

export function vertifyPhone(param) {
  // console.log(param)
  return request({
    url: '/Member/Member/chkPhone',
    method: 'post',
    data:{
      verify:param
    }
  })
}//修改手机号前验证

export function updatePhone(param) {
  // console.log(JSON.stringify(param))
  return request({
    url: '/Member/Member/chgPhone',
    method: 'post',
    data:param
  })
}//修改手机号

export function loadRecodes(param) {
  // console.log(JSON.stringify(param))
  return request({
    url: '/Member/member_bill/lists',
    method: 'get',
    params:param
  })
}//余额记录

export function rechargeRecodes(param) {
  // console.log(JSON.stringify(param))
  return request({
    url: '/Member/member_bill/myrecharge',
    method: 'get',
    params:param
  })
}//充值记录

export function rechargeCard(param) {
  // console.log(JSON.stringify(param))
  return request({
    url: '/member/member/charging_card',
    method: 'post',
    params:param
  })
}//充值卡

export function rechargeActivites() {
  // console.log(JSON.stringify(param))
  return request({
    url: '/Member/member/rebate',
    method: 'get',
  })
}//充值活动

export function feedBack(param) {
  console.log(JSON.stringify(param))
  return request({
    url: '/Member/Member/feedback',
    method: 'post',
    data:param
  })
}//意见反馈

export function canlOrder(param) {
  // console.log(JSON.stringify(param))
  return request({
    url: '/Member/Order/cancel',
    method: 'post',
    data:{
      order_id:param
    }
  })
}//取消订单

export function pay(id,paytype) {
  // console.log(JSON.stringify(param))
  return request({
    url: '/Member/Order/dopay',
    method: 'post',
    data:{
      order_id:id,
      payment:paytype
    }
  })
}//支付订单

export function orderSuccess(id) {
  // console.log(JSON.stringify(param))
  return request({
    url: '/Member/Order/complete',
    method: 'post',
    data:{
      order_id:id
    }
  })
}//确认订单完结

export function joinUs(id) {
  // console.log(JSON.stringify(param))
  return request({
    url: '/Member/company_article/info',
    method: 'post',
    data:{
      id:id
    }
  })
}// 加盟动态详情

export function evelate(param) {
  // console.log(JSON.stringify(param))
  return request({
    url: '/Member/Comment/comment',
    method: 'post',
    data:{
      comment_id:param.id,
      content:param.content
    }
  })
}// 评价

export function loadCity() {
  // console.log(JSON.stringify(param))
  return request({
    url: '/Member/region/lists',
    method: 'get'
  })
}// 城市选择












